package com.youdoneed.user.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.Date;

@ApiModel("用户")
public class User {
    @ApiModelProperty("用户ID")
    private String userId;

    @ApiModelProperty("用户名称")
    private String name;

    @ApiModelProperty("电话号码")
    private String phoneNo;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("所属国家")
    private String nation;

    @ApiModelProperty("省级名称")
    private String province;

    @ApiModelProperty("城市名称")
    private String city;

    @ApiModelProperty("所在区县")
    private String region;

    @ApiModelProperty("详细地址")
    private String address;

    @ApiModelProperty("性别：0.保密 1.男 2.女")
    private Integer gender;

    @ApiModelProperty("类型：1.普通用户 2.系统用户")
    private Integer type;

    @ApiModelProperty("经度位置")
    private Double longitude;

    @ApiModelProperty("纬度位置")
    private Double latitude;

    @ApiModelProperty("出生日期")
    private Date bornDate;

    @ApiModelProperty("图片头像URL")
    private String imageUrl;

    @ApiModelProperty("肖像URL")
    private String portraitUrl;

    @ApiModelProperty("背景图片URL")
    private String backgroundUrl;

    @ApiModelProperty("视频头像URL")
    private String videoUrl;

    @ApiModelProperty("工作名称")
    private String jobName;

    @ApiModelProperty("组织单位（学校、公司等）")
    private String organization;

    @ApiModelProperty("用户文章总数")
    private Integer totalArticle;

    @ApiModelProperty("用户好友总数")
    private Integer totalFriend;

    @ApiModelProperty("用户推荐类型：0.普通 1.推荐")
    private Integer recommendType;

    @ApiModelProperty("勿扰模式：0.关闭 1.开启")
    private Integer doNotDisturb;

    @ApiModelProperty("消息推送ID")
    private String noticeRegId;

    @ApiModelProperty("显示附近的帖子：0.隐藏 1.显示")
    private Integer showNearbyArticle;

    @ApiModelProperty("允许查看我的信息：0.禁止 1.允许 2.仅好友")
    private Integer allowMyInfo;

    @ApiModelProperty("允许查看我的视频：0.禁止 1.允许 2.仅好友")
    private Integer allowMyVideo;

    @ApiModelProperty("允许查看我的帖子：0.禁止 1.允许 2.仅好友")
    private Integer allowMyArticle;

    @ApiModelProperty("允许查看我的好友：0.禁止 1.允许 2.仅好友")
    private Integer allowMyFriends;

    @ApiModelProperty("允许附近的人找到我：0.禁止 1.允许")
    private Integer allowNearbyMe;

    @ApiModelProperty("允许人脸搜索我：0.禁止 1.允许")
    private Integer allowCoolFaceMe;

    @ApiModelProperty("允许推荐我给别人：0.禁止 1.允许")
    private Integer allowRecommendMe;

    @ApiModelProperty("向我推荐通讯录：0.禁止 1.允许")
    private Integer allowContactForMe;

    @ApiModelProperty("允许加我为好友：0.禁止 1.允许")
    private Integer allowAddMe;

    @ApiModelProperty("自动同意加好友请求：0.关闭 1.开启")
    private Integer autoAgreeAddMe;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("推荐时间")
    private Date recommandTime;

    public Date getRecommandTime() {
        return recommandTime;
    }

    public void setRecommandTime(Date recommandTime) {
        this.recommandTime = recommandTime;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhoneNo() {
        return phoneNo;
    }

    public void setPhoneNo(String phoneNo) {
        this.phoneNo = phoneNo;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude == null ? null : new BigDecimal(longitude)
                .setScale(6, BigDecimal.ROUND_HALF_UP).doubleValue();
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude == null ? null : new BigDecimal(latitude)
                .setScale(6, BigDecimal.ROUND_HALF_UP).doubleValue();
    }

    public Date getBornDate() {
        return bornDate;
    }

    public void setBornDate(Date bornDate) {
        this.bornDate = bornDate;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getPortraitUrl() {
        return portraitUrl;
    }

    public void setPortraitUrl(String portraitUrl) {
        this.portraitUrl = portraitUrl;
    }

    public String getBackgroundUrl() {
        return backgroundUrl;
    }

    public void setBackgroundUrl(String backgroundUrl) {
        this.backgroundUrl = backgroundUrl;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getOrganization() {
        return organization;
    }

    public void setOrganization(String organization) {
        this.organization = organization;
    }

    public Integer getTotalArticle() {
        return totalArticle;
    }

    public void setTotalArticle(Integer totalArticle) {
        this.totalArticle = totalArticle;
    }

    public Integer getTotalFriend() {
        return totalFriend;
    }

    public void setTotalFriend(Integer totalFriend) {
        this.totalFriend = totalFriend;
    }

    public Integer getRecommendType() {
        return recommendType;
    }

    public void setRecommendType(Integer recommendType) {
        this.recommendType = recommendType;
    }

    public Integer getDoNotDisturb() {
        return doNotDisturb;
    }

    public void setDoNotDisturb(Integer doNotDisturb) {
        this.doNotDisturb = doNotDisturb;
    }

    public String getNoticeRegId() {
        return noticeRegId;
    }

    public void setNoticeRegId(String noticeRegId) {
        this.noticeRegId = noticeRegId;
    }

    public Integer getShowNearbyArticle() {
        return showNearbyArticle;
    }

    public void setShowNearbyArticle(Integer showNearbyArticle) {
        this.showNearbyArticle = showNearbyArticle;
    }

    public Integer getAllowMyInfo() {
        return allowMyInfo;
    }

    public void setAllowMyInfo(Integer allowMyInfo) {
        this.allowMyInfo = allowMyInfo;
    }

    public Integer getAllowMyVideo() {
        return allowMyVideo;
    }

    public void setAllowMyVideo(Integer allowMyVideo) {
        this.allowMyVideo = allowMyVideo;
    }

    public Integer getAllowMyArticle() {
        return allowMyArticle;
    }

    public void setAllowMyArticle(Integer allowMyArticle) {
        this.allowMyArticle = allowMyArticle;
    }

    public Integer getAllowMyFriends() {
        return allowMyFriends;
    }

    public void setAllowMyFriends(Integer allowMyFriends) {
        this.allowMyFriends = allowMyFriends;
    }

    public Integer getAllowNearbyMe() {
        return allowNearbyMe;
    }

    public void setAllowNearbyMe(Integer allowNearbyMe) {
        this.allowNearbyMe = allowNearbyMe;
    }

    public Integer getAllowCoolFaceMe() {
        return allowCoolFaceMe;
    }

    public void setAllowCoolFaceMe(Integer allowCoolFaceMe) {
        this.allowCoolFaceMe = allowCoolFaceMe;
    }

    public Integer getAllowRecommendMe() {
        return allowRecommendMe;
    }

    public void setAllowRecommendMe(Integer allowRecommendMe) {
        this.allowRecommendMe = allowRecommendMe;
    }

    public Integer getAllowContactForMe() {
        return allowContactForMe;
    }

    public void setAllowContactForMe(Integer allowContactForMe) {
        this.allowContactForMe = allowContactForMe;
    }

    public Integer getAllowAddMe() {
        return allowAddMe;
    }

    public void setAllowAddMe(Integer allowAddMe) {
        this.allowAddMe = allowAddMe;
    }

    public Integer getAutoAgreeAddMe() {
        return autoAgreeAddMe;
    }

    public void setAutoAgreeAddMe(Integer autoAgreeAddMe) {
        this.autoAgreeAddMe = autoAgreeAddMe;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof User)) {
            return false;
        }

        User user = (User) o;

        return userId != null ? userId.equals(user.userId) : user.userId == null;
    }

    @Override
    public int hashCode() {
        return userId != null ? userId.hashCode() : 0;
    }
}